<?php if(!defined('SABLOG_ROOT')) exit('Access Denied');?>
{template header}

	<div id="page">
		<div id="wrap">
			<script type="text/javascript" src="$options[url]include/jscript/ajax.js"></script>
			<script type="text/javascript" src="$options[url]include/jscript/show.js"></script>
			<script type="text/javascript" src="$options[url]include/jscript/fiximage.js"></script>
			<script type="text/javascript">
			window.onload=function(){
				fiximage('$options[attachments_thumbs_size]');
				$(".post-body").css("display","none");
				$(".post-date").css("display","none");
				$(".attach").css("display","none");
				$(".art-tag").css("display","none");
			}
			$(document).ready(function(){
				$(".post-title a").click(function() {
						if($(this).parent(".post-title").next(".rd").children(".post-date").css("display") == "none") {
							 $(".post-body").slideUp();
							 $(".post-date").slideUp();
							 $(this).parent(".post-title").next(".rd").children(".post-date").slideDown("fast",function() {
																												 $(this).next(".post-body").slideDown("slow");
																												 });
							 return false;
						} else {
							 $(".post-body").slideUp();
							 $(".post-date").slideUp();
							 return false;
						}});
				$(".post-title a").dblclick(function(){
							self.location = $(this).get(0).href;
						});
			});
			</script>
			<!--{if $total}-->
				<!--{loop $articledb $article}-->
      		    <div class="box">
					<h1 class="post-title"><a href="$article[url]">$article[title]</a></h1>
					<div class="rd">
						<p class="post-date">Written by <a href="$article[userurl]">$article[username]</a> on $article[dateline]</p>
					<!--{if !$article['allowread']}-->

						<div class="needpwd">
							<form action="$article[url]" method="post">
							这篇日志被加密了，请输入密码后查看。<br />
							<input class="formfield" type="password" name="readpassword" style="margin-right:5px;" />
							<button type="submit">提交</button>
							</form>
						</div>

					<!--{else}-->
                    
						<div class="post-body">
							<p>&raquo; <a href="$article[url]">阅读全文</a></p>
                        	$article[content]
							<p>&raquo; <a href="$article[url]">阅读全文</a></p>
						</div>
                        
						<!--{if $article['image']}-->
							<!--{loop $article['image'] $image}-->
								<!--{if $image[6]}-->
									<p class="attach">图片附件(缩略图):<br /><a href="$options[url]attachment.php?id=$image[0]" target="_blank"><img src="{$options[url]}{$image[1]}" border="0" alt="$image[7]&#13;&#13;大小: $image[2]&#13;尺寸: $image[3] x $image[4]&#13;浏览: $image[5] 次&#13;点击打开新窗口浏览全图" width="$image[3]" height="$image[4]" /></a></p>
								<!--{else}-->
									<p class="attach">图片附件:<br /><a href="$options[url]attachment.php?id=$image[0]" target="_blank"><img src="{$options[url]}{$image[1]}" border="0" alt="$image[7]&#13;&#13;大小: $image[2]&#13;尺寸: $image[3] x $image[4]&#13;浏览: $image[5] 次&#13;点击打开新窗口浏览全图" width="$image[3]" height="$image[4]" /></a></p>
								<!--{/if}-->
							<!--{/loop}-->
						<!--{/if}-->
						<!--{if $article['file']}-->
							<!--{loop $article['file'] $file}-->
								<p class="attach">附件:<a title="$file[1]" href="$options[url]attachment.php?id=$file[0]" target="_blank">$file[1]</a> ($file[2], 下载次数:$file[3])</p>
							<!--{/loop}-->
						<!--{/if}-->

						<!--{if $article['keywords']}-->
							<h3 class="art-tag">Tags: $article[alltags]</h3>
						<!--{/if}-->

						<p class="post-meta">
							<span class="cat-links">Filed under: <a href="$article[cateurl]">$article[cname]</a></span>
							<span class="post-meta-link"><a href="$article[url]#comment">$article[comments] Comments</a></span>
							<!--{if $options['enable_trackback']}-->
								<span class="post-meta-link"><a href="$article[url]#trackbacks">$article[trackbacks] Trackbacks</a></span>
							<!--{/if}-->
							<span class="post-meta-link"><a href="$article[url]">$article[views] Views</a></span>
						</p>

					<!--{/if}-->

					</div>
				</div>

				<!--{/loop}-->

				$multipage

			<!--{else}-->

				<p>没有任何文章</p>

			<!--{/if}-->

		</div>
		<div id="sidebar">

			{template sidecomm}

		</div>
	</div>